package com.example.generic;

import java.lang.reflect.Field;

public class GenericErase {
    public static void main(String[] args) {
        Class<Generic> genericClass = Generic.class;
        Field[] declaredFields = genericClass.getDeclaredFields();
        for (Field field : declaredFields) {
            System.out.println(field.getName()
                    + ":" + field.getType());
        }
    }
}

class Generic<T extends Number> {
    T t;
    String str;
}
